From: Felix Date: Sat, 4 Jan 2025 15:06:03 +0000 (+0100) Subject: Log path strings directly instead of accumulating X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~114^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=2c2cb135ca0474d154ae054c42bb1634ac10f622;p=nextcloud-desktop.git Log path strings directly instead of accumulating Signed-off-by: Felix --- diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp index 368d0f8c8..30fa24115 100644 --- a/src/libsync/syncengine.cpp +++ b/src/libsync/syncengine.cpp @@ -1216,12 +1216,14 @@ void SyncEngine::setLocalDiscoveryOptions(LocalDiscoveryStyle style, std::set QString { - first += ", " + second; - return first; - }); - - qCInfo(lcEngine()) << "paths to discover locally" << allPaths; + if (lcEngine().isInfoEnabled()) { + // only execute if logging is enabled + auto debug = qInfo(lcEngine); + debug << "paths to discover locally"; + for (auto path : _localDiscoveryPaths) { + debug << path; + } + } // Normalize to make sure that no path is a contained in another. // Note: for simplicity, this code consider anything less than '/' as a path separator, so for